﻿using ITXHWEB.Models;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Web.Mvc;
using WPFExcelReport;
using WPFExcelReport.Helpers;
using ITXHWEB.Infrastructure;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace ITXHWEB.Controllers
{
    public partial class WBFEHLController 
    {
        [ChildActionOnly]
        public ActionResult PERBEGIN(string returnUrl)
        {
            ModelState.Clear();
            ViewBag.ReturnUrl = returnUrl;
            return PartialView(MABF.CWBB.CERK.CERROR);
        }

        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        public ActionResult PERBEGIN(WBFEHLModel model, string returnUrl)
        {
            try
            {
                MABF.CWBB.CERK.CERROR.WBFLGVON = MABF.MAM.UIAM.VU0;
                MABF.CWBB.CERK.CERROR.dwMaster["WBFLGVON"] = MABF.MAM.UIAM.VU0;
                MABF.CWBB.CERK.CERROR.WBFLGBIS = MABF.MAM.UIAM.VU0;
                MABF.CWBB.CERK.CERROR.dwMaster["WBFLGBIS"] = MABF.MAM.UIAM.VU0;
                OnInspection();
            }
            catch (Exception ex)
            {
                //ModelState.AddModelError("",ex.Message);
                Tracer.Error(ex.StackTrace, ex);
            }
            return RedirectToAction(MAPP, MAPP);
        }
    }
}
